package com.ssm.service;


import com.ssm.pojo.Good;

import java.util.List;

/**
 * @program: exercise1_online_shopping
 * @author: qin haojun
 * @create: 2021-02-14 16:37
 */
public interface GoodService {

    /**
     * 通过货物名（唯一）更改货物数量
     * @param name
     * @param total
     * @throws Exception
     */
    public void updateTotalByName(String name, Integer total)throws Exception;
    /**
     * 通过货物id（唯一）更改货物数量
     * @param goodId
     * @param total
     * @throws Exception
     */
    public void updateTotalById(Integer goodId, Integer total)throws Exception;

    public Good selectGoodByName(String name)throws Exception;

    public Good selectGoodById(Integer id)throws Exception;

    public List<Good> selectGoodsByKeyWord(String keyWord) throws Exception;

    public List<Good> getGoodList()throws Exception;

    public Integer getSellCnt(Integer gid)throws Exception;
}
